import { lazy } from "react"
import { useRoutes } from "react-router-dom"
import lazyComponent from "../utils/lazyComponent"

const IndexRoutes=() => {
    return useRoutes([
        {
            path:"",
            element:lazyComponent(
                lazy(() => import('../pages/IndexPage'))
            ),
            children:[
                {
                    path:"home",
                    index:true,
                    element:lazyComponent(
                        lazy(() => import('../pages/home'))
                    ),
                },
                {
                    path:"about",
                    element:lazyComponent(
                        lazy(() => import('../pages/about'))
                    ),
                }
            ]
            
        }
    ])
}
export default IndexRoutes;